import java.util.Arrays;
import java.util.Scanner;

public class TestDemo {

    /*public static void print(int[] arr,int length) {
        if (length < 1) {
            return;
        }
        System.out.print(arr[length - 1] + " ");
        print(arr, length - 1);
    }

    public static void main(String[] args) {
        int[] arr = {66,55,77,99,44,3333};
        print(arr,arr.length);
    }

     */

    /*public static int judge(int p, int q) {
        return Math.max(p,q);
    }

    public static double judge(double p, double q) {
        return Math.max(p,q);
    }

    public static void judge(double a1, double a2, int b1) {
        double max1=a1>a2?a1:a2;
        double max2=max1>b1?max1:b1;
        double min1=a1>a2?a2:a1;
        double min2=min1>b1?b1:min1;
        double mid=a1+a2+b1-max2-min2;
        System.out.println(min2+"<"+mid+"<"+max2);
    }

    public static void main(String[] args) {
        int num1 = 10, num2 = 20;
        double num3 = 66.66, num4 = 88.88;
        int sum1 = judge(num1, num2);
        double sum2 = judge(num3,num4);
        System.out.println(sum1 + " " + sum2);
        judge(num3, num4, num2);
    }

     */

    /*public static int fib(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        return fib(n - 1) + fib(n - 2);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = fib(n);
        sc.close();
        System.out.println(res);
    }
     */

    /*
    public static int digitSum(int n) {
        if (n <= 9) {
            return n;
        }
        return n % 10 + digitSum(n / 10);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n =sc.nextInt();
        int res = digitSum(n);
        sc.close();
        System.out.println(res);
    }
    */

    /*
    public static void printDigit(int n) {
        if (n == 0) {
            return;
        }
        printDigit(n / 10);
        System.out.print(n % 10 + " ");
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        printDigit(n);
        sc.close();
    }

     */

    /*public static int sum(int n) {
        if (n == 1) {
            return 1;
        }
        return n + sum(n- 1);
    }

    public static void main(String[] args) {
        int res = sum(10);
        System.out.println(res);
    }

     */

    /*public static int fac(int n) {
        if (n == 1 || n == 0) {
            return 1;
        }
        return n * fac(n - 1);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = fac(n);
        sc.close();
        System.out.println(res);
    }

     */

    /*public static int sum(int[] arr) {
        int sum = 0;
        for (int i: arr) {
            sum += i;
        }
        return sum;
    }

    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6,7,8,9,10};
        int res = sum(arr);
        System.out.println(res);
    }

     */

    /*public static void transform(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            arr[i] *= 2;
        }
    }

    public static void main(String[] args) {
        int[] arr = {2,4,6,8};
        transform(arr);
        System.out.println(Arrays.toString(arr));
    }

     */

    /*public static void printArray(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }

    }

    public static void main(String[] args) {
        int[] arr = {2,4,6,8};
        printArray(arr);
    }
     */

    /*public static void main(String[] args) {
        int[] arr = new int[100];
        for (int i = 0; i < arr.length;i++) {
            arr[i] = i + 1;
        }
        System.out.println(Arrays.toString(arr));
    }

     */

    /*public static void myStringToArray(int[] arr) {
        String str = "[";
        for (int i = 0; i < arr.length; i++) {
            str = str + arr[i];
            if (i < arr.length - 1) {
                str += ",";
            }
        }
        str += "]";
        System.out.println(str);
    }

    public static void main(String[] args) {
        int[] arr = {1,2,3,4};
        myStringToArray(arr);
    }

     */

    public static int[] myCopyOf(int[] arr,int length) {
        int[] copy = new int[length];
        for (int i = 0; i < arr.length;i++) {
            copy[i] = arr[i];
        }
        return copy;
    }

    public static void main(String[] args) {
        int[] arr = {2,4,6,8,10};
        int[] copy = myCopyOf(arr,10);
        System.out.println(Arrays.toString(copy));
    }
}


/*
 public boolean isCompleteTree(TreeNode root) {
        if (root.right == null && root.left == null) {
            return true;
        }
        Queue<TreeNode> queue = new LinkedList<TreeNode>();
        queue.add(root);
        boolean flag = false;
        while (!queue.isEmpty()) {
            TreeNode cur = queue.poll();
            TreeNode l = cur.left;
            TreeNode r = cur.right;
            if ((l == null && r != null) ||(flag && (l != null || r != null))) {
                return false;
            }
            if (l != null) {
                queue.add(l);
            }
            if (r != null) {
                queue.add(r);
            }
            if (l == null || r == null) {
                flag = true;
            }
        }
        return true;
    }
 */

/*
public TreeNode invertTree(TreeNode root) {
		if(root==null) {
			return null;
		}
		LinkedList<TreeNode> queue = new LinkedList<TreeNode>();
		queue.add(root);
		while(!queue.isEmpty()) {
			TreeNode tmp = queue.poll();
			TreeNode left = tmp.left;
			tmp.left = tmp.right;
			tmp.right = left;
			if(tmp.left!=null) {
				queue.add(tmp.left);
			}
			if(tmp.right!=null) {
				queue.add(tmp.right);
			}

		}
		return root;
	}
 */

/*
 public boolean isSymmetric(TreeNode root) {
        TreeNode l = root;
        TreeNode r = root;
        Queue<TreeNode> queue = new LinkedList<TreeNode>();
        queue.add(l);
        queue.add(r);
        while (!queue.isEmpty()) {
            l = queue.poll();
            r = queue.poll();
            if (l == null && r == null) {
                continue;
            }
            if ((l == null || r == null) || (l.val != r.val)) {
                return false;
            }
            queue.add(l.left);
            queue.add(r.right);
            queue.add(l.right);
            queue.add(r.left);
        }
        return true;
    }
 */

/*
 public List<Integer> rightSideView(TreeNode root) {
        List<Integer> list = new ArrayList<Integer>();
        if (root != null) {
            Queue<TreeNode> queue = new LinkedList<TreeNode>();Z
            queue.add(root);
            while (!queue.isEmpty()) {
                int size = queue.size();
                int i;
                for (i = 0; i < size; i++) {
                    TreeNode cur = queue.poll();
                    if (cur.left != null) {
                        queue.add(cur.left);
                    }
                    if (cur.right != null) {
                        queue.add(cur.right);
                    }
                    if (i == size - 1) {
                        list.add(cur.val);
                    }
                }
            }
        }
        return list;
    }
 */

/*
class Solution {
    public boolean isBalanced(TreeNode root) {
        return process(root).isBST;
    }

    public ReturnType process(TreeNode x) {
        if (x == null) {
            return new ReturnType(true,0);
        }
        ReturnType left = process(x.left);
        ReturnType right = process(x.right);
        int height = Math.max(left.height,right.height) + 1;
        boolean isBalanced = left.isBST && right.isBST && (Math.abs(left.height - right.height) < 2);
        return new ReturnType(isBalanced,height);
    }
}



class ReturnType {
    boolean isBST;
    int height;
    public ReturnType(boolean isBST, int height) {
        this.height = height;
        this.isBST = isBST;
    }
}
 */

/*
 public int sumNumbers(TreeNode root) {
        Queue<TreeNode> nodeQueue = new LinkedList<TreeNode>();
        Queue<Integer> numQueue = new LinkedList<Integer>();
        int sum = 0;
        nodeQueue.add(root);
        numQueue.add(root.val);
        while (!nodeQueue.isEmpty()) {
            TreeNode cur = nodeQueue.poll();
            TreeNode l = cur.left;
            TreeNode r = cur.right;
            int num = numQueue.poll();
            if (l == null && r == null) {
                sum += num;
            } else {
                if (l != null) {
                    nodeQueue.add(l);
                    numQueue.add(num*10 + l.val);
                }
                if (r != null) {
                    nodeQueue.add(r);
                    numQueue.add(num*10 + r.val);
                }
            }
        }
        return sum;
    }
 */

/*
 public int minDepth(TreeNode root) {
        if(root == null) return 0;
        int m1 = minDepth(root.left);
        int m2 = minDepth(root.right);
        return root.left == null || root.right == null ? m1 + m2 + 1 : Math.min(m1,m2) + 1;
    }
 */

/*
public int maxDepth(TreeNode root) {
        if (root == null) {
            return 0;
        }
        Queue<TreeNode> queue = new LinkedList<TreeNode>();
        queue.add(root);
        int ans = 0;
        while (!queue.isEmpty()) {
            int size = queue.size();
            while (size > 0) {
                TreeNode cur = queue.poll();
                if (cur.left != null) {
                    queue.add(cur.left);
                }
                if (cur.right != null) {
                    queue.add(cur.right);
                }
                --size;
            }
            ans++;
        }
        return ans;
    }
 */

/*
 public boolean isValidBST(TreeNode root) {
        long min = Long.MIN_VALUE;
        Stack<TreeNode> stack = new Stack<TreeNode>();
        while (!stack.isEmpty() || root != null) {
            if (root != null) {
                stack.push(root);
                root = root.left;
            } else {
                root = stack.pop();
                if (root.val <= min) {
                    return false;
                }
                min = root.val;
                root = root.right;
            }
        }
        return true;
    }
 */

